<?php
/*
* $type: 0：报名；1：关注；2：邀请
* $obj_nid: 跟随type变动
* */
function add_memeber_circle($type,$member_nid,$obj_nid,$target_member_nid = 0)

{

//设置需要搜索的表格的前缀后缀
$table = "athlon_member_circle";

// 添加邀请
$user_insert['ai_type']                  = $type;
$user_insert['ai_member_nid']            = $member_nid;
$user_insert['ai_obj_nid']               = $obj_nid;
$user_insert['ai_add_time']              = date("Y-m-d H:i:s");
$user_insert['ai_target_member_nid']     = $target_member_nid == 0 ? $member_nid  : $target_member_nid;

$sql   =insert_date($table,$user_insert);
$query = do_query($sql) or die (mysqli_error().$sql);
return $query;

}

?>